package edu.pw.treegrid.client.format;

import com.smartgwt.client.widgets.grid.CellFormatter;

import edu.pw.treegrid.shared.ReportColumnType;

public class FormatterFactory {
	public static CellFormatter newFormatter(ReportColumnType type, String format) {
		switch(type) {
			case INTEGER:
			case FLOAT:
				return new NumberFormatter(format);
			case DATE:
				return new DateFormatter(format);
		}
		
		return null;
	}
}
